package com.rankeiot.core.data;

import lombok.Data;

@Data
public class MenuItem extends Item{
    public static final int TYPE_MENU=0;//菜单
    public static final int TYPE_PERMISSION=1;//权限
    private String parent;
    private String icon;
    private String path;
    private int type=TYPE_MENU;

    private boolean enable=true;

    private boolean system=true;

    public MenuItem(){

    }
    //拷贝构造
    public MenuItem(MenuItem item){
        this(item.getKey(),item.getTitle(),item.getIcon(),item.getOrder());
        this.setParent(item.getParent());
        this.setType(item.getType());
        this.setPath(item.getPath());
        this.setEnable(item.isEnable());
    }
    public MenuItem(String key, String title){
        super(key,title);
    }
    public MenuItem(String key, String title,String path){
        super(key,title);
        this.path=path;
    }
    public MenuItem(String key, String title, String icon, int order) {
        super(key, title);
        this.icon = icon;
        this.setOrder(order);
    }

}
